import React, { Component } from 'react';
import Toast from 'react-native-root-toast';

export default class ToastUtils extends React.Component
{
    static toastShortBottom(content)
    {
        Toast.show(content.toString(), {
            duration: Toast.durations.SHORT,
            position: Toast.positions.BOTTOM,
            shadow: true,
            animation: true,
            hideOnPress: true,
            delay: 0
        });
    }

    static toastLongBottom(content)
    {
        Toast.show(content.toString(), {
            duration: Toast.durations.LONG,
            position: Toast.positions.BOTTOM,
            shadow: true,
            animation: true,
            hideOnPress: true,
            delay: 0
        });
    }

    static toastShortCenter(content)
    {
        Toast.show(content.toString(), {
            duration: Toast.durations.SHORT,
            position: Toast.positions.CENTER,
            shadow: true,
            animation: true,
            hideOnPress: true,
            delay: 0
        });
    }

    static toastLongCenter(content)
    {
        Toast.show(content.toString(), {
            duration: Toast.durations.LONG,
            position: Toast.positions.CENTER,
            shadow: true,
            animation: true,
            hideOnPress: true,
            delay: 0
        });
    }

}
